<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Table</title>
    <style>
        th {
            font-size: 18px;
            text-align: center;
            /* padding-top: 50px; */
            padding: 20px;
            background-color: #BDB76B;
            color: #006400;
        }
        
        caption {
            font-size: 35px;
            color: black;
        }
        
        td {
            font-size: 15px;
            border: 1px solid #008B8B;
            padding: 3px;
            background-color: khaki;
        }
        
        tr.alt td {
            color: #F0E68C;
            background-color: #B22222;
        }
    </style>
</head>

<body>
    <h2>合并列</h2>
    <!-- 表格 table,边框 border -->
    <table border="1">
        <!-- caption 表格题注 -->
        <caption>Test Result</caption>
        <!-- 表格逻辑部分，表头 -->
        <thead>
            <!-- tr 一行 -->
            <tr>
                <!-- th 表头 -->
                <th>Name</th>
                <th>Login Id</th>
                <th>Course Name</th>
                <th>Marks</th>
            </tr>
        </thead>
        <!-- 表体 -->
        <tbody>

            <tr class="alt">
                <!-- 单元格内容 -->
                <td>Steve</td>
                <td>01234</td>
                <td>Mysql</td>
                <td>90</td>
            </tr>
            <tr>
                <td>John</td>
                <td>01235</td>
                <td>Mysql</td>
                <td>95</td>
            </tr>
            <tr class="alt">
                <td>Michel</td>
                <td>01236</td>
                <td>Mysql</td>
                <td>85</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <!-- colspan 合并列 -->
                <td colspan="3">Total number of students</td>
                <td>3</td>
            </tr>
        </tfoot>
    </table>

    <h2>合并行</h2>
    <table border="1">
        <!-- caption 表格题注 -->
        <caption>Test Result</caption>
        <tbody>
            <tr>
                <td rowspan="4">
                    Top Three performs
                </td>
            </tr>
            <tr>
                <td>Steve</td>
                <td>01234</td>
                <td>Mysql</td>
                <td>90</td>
            </tr>
            <tr>
                <td>John</td>
                <td>01235</td>
                <td>Mysql</td>
                <td>95</td>
            </tr>
            <tr>
                <td>Michel</td>
                <td>01236</td>
                <td>Mysql</td>
                <td>85</td>
            </tr>
        </tbody>

    </table>
</body>

</html>